package com.yuang.library.base;

/**
 * Created by Yuang on 17/12/8.
 * Summary:BaseResponse
 */
public class BaseResponse<DataType> {

    public static final int RESULT_CODE_SUCCESS = 10001;
    public static final int RESULT_CODE_SUCCESS_NO_DYNAMIC = 10002;
    public static final int RESULT_CODE_TOKEN_EXPIRED = 401;

    /**
     * 通用返回值属性
     */
    private int status;
    /**
     * 通用返回信息。
     */
    private String msg;
    /**
     * 具体的内容。
     */
    private DataType result;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public DataType getResult() {
        return result;
    }

    public void setResult(DataType result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "BaseResponse{" +
                "status=" + status +
                ", msg='" + msg + '\'' +
                ", result=" + result +
                '}';
    }
}